+2001-10-03 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextiter.c (test_log_attrs): allow testing the end
+ position
+
+ * gtk/gtktextbuffer.c (compute_log_attrs): update for pango
+ changes
+
+ * tests/testtextbuffer.c (logical_motion_tests): updates
+
2001-10-03 jacob berkman <jacob@ximian.com>
* gtk/gtkwidget.c (gtk_widget_style_get_property):
+2001-10-03 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextiter.c (test_log_attrs): allow testing the end
+ position
+
+ * gtk/gtktextbuffer.c (compute_log_attrs): update for pango
+ changes
+
+ * tests/testtextbuffer.c (logical_motion_tests): updates
+
2001-10-03 jacob berkman <jacob@ximian.com>
* gtk/gtkwidget.c (gtk_widget_style_get_property):
+2001-10-03 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextiter.c (test_log_attrs): allow testing the end
+ position
+
+ * gtk/gtktextbuffer.c (compute_log_attrs): update for pango
+ changes
+
+ * tests/testtextbuffer.c (logical_motion_tests): updates
+
2001-10-03 jacob berkman <jacob@ximian.com>
* gtk/gtkwidget.c (gtk_widget_style_get_property):
+2001-10-03 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextiter.c (test_log_attrs): allow testing the end
+ position
+
+ * gtk/gtktextbuffer.c (compute_log_attrs): update for pango
+ changes
+
+ * tests/testtextbuffer.c (logical_motion_tests): updates
+
2001-10-03 jacob berkman <jacob@ximian.com>
* gtk/gtkwidget.c (gtk_widget_style_get_property):
+2001-10-03 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextiter.c (test_log_attrs): allow testing the end
+ position
+
+ * gtk/gtktextbuffer.c (compute_log_attrs): update for pango
+ changes
+
+ * tests/testtextbuffer.c (logical_motion_tests): updates
+
2001-10-03 jacob berkman <jacob@ximian.com>
* gtk/gtkwidget.c (gtk_widget_style_get_property):
+2001-10-03 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextiter.c (test_log_attrs): allow testing the end
+ position
+
+ * gtk/gtktextbuffer.c (compute_log_attrs): update for pango
+ changes
+
+ * tests/testtextbuffer.c (logical_motion_tests): updates
+
2001-10-03 jacob berkman <jacob@ximian.com>
* gtk/gtkwidget.c (gtk_widget_style_get_property):
+2001-10-03 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextiter.c (test_log_attrs): allow testing the end
+ position
+
+ * gtk/gtktextbuffer.c (compute_log_attrs): update for pango
+ changes
+
+ * tests/testtextbuffer.c (logical_motion_tests): updates
+
2001-10-03 jacob berkman <jacob@ximian.com>
* gtk/gtkwidget.c (gtk_widget_style_get_property):
if (char_lenp)
*char_lenp = char_len;
- attrs = g_new (PangoLogAttr, char_len);
-
+ attrs = g_new (PangoLogAttr, char_len + 1);
+
+ /* FIXME we need to follow PangoLayout and allow different language
+ * tags within the paragraph
+ */
pango_get_log_attrs (paragraph, byte_len, -1,
gtk_text_iter_get_language (&start),
- attrs);
+ attrs,
+ char_len + 1);
g_free (paragraph);
offset = gtk_text_iter_get_line_offset (iter);
/* char_len may be 0 and attrs will be NULL if so, if
- * iter is the end iter and the last line is empty
+ * iter is the end iter and the last line is empty.
+ *
+ * offset may be equal to char_len, since attrs contains an entry
+ * for one past the end
*/
- if (offset < char_len)
+ if (offset <= char_len)
result = (* func) (attrs, offset, 0, char_len);
return result;
if (!gtk_text_iter_is_end (&iter))
g_error ("Expected to stop at the end iterator\n");
+
+ if (!gtk_text_iter_is_cursor_position (&iter))
+ g_error ("Should be a cursor position before the end iterator");
if (i != expected_steps)
g_error ("Expected %d steps, there were actually %d\n", expected_steps, i);
pos, expected[i]);
}
+ if (i != 0 &&
+ !gtk_text_iter_is_end (&iter) &&
+ !gtk_text_iter_ends_sentence (&iter))
+ g_error ("Iterator at %d should end a sentence", pos);
+
++i;
}
while (gtk_text_iter_forward_sentence_end (&iter));
pos, expected[i]);
}
+ if (pos != 0 &&
+ !gtk_text_iter_is_end (&iter) &&
+ !gtk_text_iter_starts_sentence (&iter))
+ g_error ("Iterator at %d should start a sentence", pos);
+
++i;
}
while (gtk_text_iter_backward_sentence_start (&iter));